/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package my.cbr.database.model;

import java.util.ArrayList;
import java.util.List;
import jcolibri.cbrcore.Attribute;
import jcolibri.cbrcore.CaseComponent;
import my.cbr.casedescriptions.CaseDescription;

/**
 *
 * @author Geir Ole
 */
public class AquacultureSite implements CaseComponent {
    private Integer siteID;
    private Integer capacity;
    private List<CaseDescription> desc = new ArrayList<CaseDescription>();

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    public List<CaseDescription> getDesc() {
        return desc;
    }

    public void setDesc(List<CaseDescription> desc) {
        this.desc = desc;
    }

    public void addDesc(CaseDescription desc) {
        this.desc.add(desc);
    }

    public Integer getSiteID() {
        return siteID;
    }

    public void setSiteID(Integer siteID) {
        this.siteID = siteID;
    }

    @Override
    public String toString() {
        return "AquacultureSite{" + "siteID=" + siteID + "capacity=" + capacity + '}';
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof AquacultureSite)
        {
            AquacultureSite site = (AquacultureSite) obj;
            if(site.getSiteID()==this.getSiteID())
                return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 79 * hash + (this.siteID != null ? this.siteID.hashCode() : 0);
        return hash;
    }

    public Attribute getIdAttribute() {
        return new Attribute("siteID", this.getClass());
    }
}
